import React from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Form, Switch, Button, Card, Input } from 'antd'
const { TextArea } = Input
export default () => {
    return (
        <PageHeaderWrapper title={false}>
            <Card>
                <Form
                    labelCol={{ span: 3 }}
                    wrapperCol={{ span: 15 }}
                    initialValues={{ enable: true }}
                >
                    <Form.Item label="是否启用" name="enable" valuePropName="checked" help="api安全功能开启之后调用前端api需要传输签名串">
                        <Switch />
                    </Form.Item>
                    <Form.Item label="应用公钥" name="public_secret" >
                        <TextArea rows={3}/>
                    </Form.Item>
                    <Form.Item label="应用私钥" name="private_secret" help="私钥设置关系系统中api调用传输签名串的编码规则，以及会员token解析，请慎重设置，注意设置之后对应会员要求重新登录获取token">
                        <TextArea rows={3}/>
                    </Form.Item>
                    <Form.Item wrapperCol={{ offset: 3 }}>
                        <Button style={{ marginRight: "6px" }}>生成密钥</Button>
                        <Button type="primary">保存</Button>
                    </Form.Item>
                </Form>
            </Card>
        </PageHeaderWrapper>
    )
}